package com.machuxin.course.patterns.factory.method;


import com.machuxin.course.patterns.factory.simple.beans.Fruits;

/**
 * 测试
 */
public class FactoryMethodTest {

    public static void main(String[] args) {
        FruitsFactory factory = new AppleFactory();
        Fruits fruits = factory.create();
        fruits.getName();

        factory = new BananaFactory();
        fruits = factory.create();
        fruits.getName();

    }

}
